package game.Sprites;

import game.Utils.GraphicsUtils;
import game.Vector3;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.effect.BlendMode;
import javafx.scene.paint.Color;

public class Explosion extends AnimatedSprite {
    public Explosion(Vector3 position, double rotation, double size, Color color) throws Exception {
        super(position, rotation, size, size, color, SpriteResources.getExplosionSheet(), 0.7, false);
    }

    @Override
    public void draw(GraphicsContext gc, Vector3 screenPos, double squareRes){
        BlendMode oldBlend = gc.getGlobalBlendMode();
        gc.setGlobalBlendMode(BlendMode.SCREEN);
        super.draw(gc,screenPos,squareRes);
        gc.setGlobalBlendMode(oldBlend);
    }
}
